package top.ranzhang.bean.dto;

import jakarta.validation.Valid;
import jakarta.validation.constraints.Min;
import jakarta.validation.constraints.NotBlank;
import jakarta.validation.constraints.NotNull;
import jakarta.validation.constraints.Size;
import lombok.Data;
import top.ranzhang.bean.entity.User;

import java.time.LocalDate;

@Data
public class AddChildDTO {

    @NotNull(message = "生日不能为空")
    private LocalDate birthday;

    /**
     * 购买课时
     */
    @Min(value = 1,message = "购买课时不能小于1")
    private Integer buyHour;


    /**
     * 使用课时
     */
    private Integer useHour;

    /**
     * 赠送课时
     */
    @Min(value = 0,message = "赠送课时不能小于0")
    private Integer giveHour;

    /**
     * 1:男,0:女
     */
    @NotNull(message = "性别不能为空")
    private Integer sex;

    @NotBlank(message = "姓名不能为空")
    private String name;

    @NotBlank(message = "学校不能为空")
    private String school;
    //家长
    @Valid
    @NotNull(message = "家长不能为空")
    private User user;
}
